Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --locked to cargo install cargo-audit #72

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Mar 22, 2024

For current cargo-audit v0.20.0, building without --locked resulted in the failure of cargo audit command.

Such buggy cargo-audit build will shows error like:

cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
error: couldn't fetch advisory database: git operation failed: failed to prepare fetch: An IO error occurred when talking to the server

It caused our CI using this action failed: https://github.com/dfinity/sdk/actions/runs/8391495630/job/22997036128.

There must be some dependency of cargo-audit have new minor/patch release that is broken.

Adding --locked can make sure that all the dependencies are at the versions when cargo-audit release v0.20.0.
This is the common practice to for dealing with bin crate.

With this fix, the CI of my project can pass now: https://github.com/dfinity/sdk/actions/runs/8396775228/job/22998852636

@lwshang lwshang mentioned this pull request Mar 22, 2024
3 tasks
@jonasbb
Copy link
Member

jonasbb commented Mar 26, 2024

Thank you. Yes, using --locked makes sense here, just to protect from unwanted changes in dependencies.

@jonasbb jonasbb merged commit ddc2157 into actions-rust-lang:main Mar 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants